define(function (require, exports, module) {
  const loadComponent = function (path) {
    const k = path.split("/");
    const j = k[k.length - 1].split(".");
    const componentName = j[0];
    return function () {
      return new Promise((resolve, reject) => {
        require.async(path, function (data) {
          new Function(`define('${componentName}',function(require, exports, module){
            ${data}
            })`)();
          require.async(componentName, function (b) {
            resolve(b);
          });
        });
      });
    };
  };
  module.exports = loadComponent;
});
